/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.flf.audioteca.dao.entitymanager;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author Nathan Azevedo
 */
public class EntityManagerController {

    private static EntityManagerFactory emf = null;

    protected static javax.persistence.EntityManager getEntityManager() {
        if (emf == null) {
            emf = Persistence.createEntityManagerFactory("AudiotecaPU");
        }
        return emf.createEntityManager();
    }

    
}